package com.vincent.filepicker.filter.entity;

import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

/**
 * Created by Vincent Woo
 * Date: 2016/10/12
 * Time: 14:45
 */

public class NormalFile extends BaseFile implements Sequenceable {
    private String mimeType;

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    @Override
    public boolean marshalling(Parcel dest) {
        dest.writeString(getMimeType());
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel in) {
        mimeType = in.readString();
        return true;
    }

    public static final Sequenceable.Producer
            PRODUCER = new Sequenceable.Producer
            () {
        public BaseFile createFromParcel(Parcel in) {
            NormalFile instance = new NormalFile();
            instance.unmarshalling(in);
            return instance;
        }
    };

}
